package com.bit.cfdi.web.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bit.cfdi.web.dao.MetodoPagoDAO;
import com.bit.cfdi.web.domain.MetodoPago;
import com.bit.cfdi.web.domain.Negocio;

@Service
public class MetodoPagoService {
	
	@Autowired MetodoPagoDAO metodoPagoDAO;

	@Transactional public List<MetodoPago> getAll() {
		return metodoPagoDAO.getAll();
	}

	@Transactional public MetodoPago getByDescription(String description) {	
		return metodoPagoDAO.getByDescription(description);
	}

	@Transactional public void save(MetodoPago metodoPago) {
		metodoPagoDAO.save(metodoPago);
	}

	@Transactional public List<MetodoPago> getAllDefault() {
		return metodoPagoDAO.getAllDefault();
	}

	@Transactional public List<MetodoPago> getByNegocio(Negocio negocio) {
		return metodoPagoDAO.getByNegocio(negocio);
	}

	@Transactional public MetodoPago getByDescriptionDefatul(String description) {
		return metodoPagoDAO.getByDescriptionDefatul(description);
	}

	@Transactional public MetodoPago getByDescriptionNegocio(String description,
			Negocio negocio) {
		return metodoPagoDAO.getByDescriptionNegocio(description, negocio);
	}

}